<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui" template="../../index.xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:f="http://xmlns.jcp.org/jsf/core">


    <ui:define name="content">
        <!--        Desenvolver Formularios das Categorias-->
        <h:form id="formularioCate">
            <p:growl
                id="growl"
                showDetail="true"
                sticky="false"/>

            <div align="center">

                <p:panel id="panel" header="Categoria">

                    <h:inputHidden value="#{categoriaBean.categoria.id}"/>

                    <p:panelGrid columns="3">
                        <h:outputText value="Nome"/>
                        <p:inputText value="#{categoriaBean.categoria.nome}"/>


                        <p:menuButton value="Opções">
                            <p:menuitem value="Salvar" action="#{categoriaBean.salvar()}" update="growl" icon="ui-icon-disk"/>
                            <p:menuitem value="Cancelar" action="#{categoriaBean.cancelar()}" update="growl" icon="ui-icon-arrowrefresh-1-w"/>
                            <p:separator />
                            <p:menuitem value="Voltar Página Inicial" url="../../index.xhtml" icon="ui-icon-extlink"/>
                        </p:menuButton>  
                    </p:panelGrid>

                </p:panel>
            </div>
        </h:form>
    </ui:define>
</ui:composition>
